import { defineConfig } from 'vite'
import path, { join } from 'path';
import setupPlugins from "./vite/plugins";

// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
  const isBuild = command == 'build'

  return {
    publicPath:"/",
    plugins: [...setupPlugins(isBuild)],
    //设置别名
    resolve: {
      alias: {
        "@/components": join(__dirname, './src/components/')
      },
      extensions: [".vue",'.js', '.json', '.ts', '.tsx'],//使用别名省略的后缀名
    }
  }

})
